﻿using Microsoft.UI.Xaml.Markup;

namespace DimensionsHelper.Client.WinUi.Extensions;

public partial class EnumDescriptionExtension : MarkupExtension
{
    public Type? Type
    {
        get;
        set;
    }


    protected override object ProvideValue()
    {
        if (Type == null)
        {
            return Array.Empty<string>();
        }

        return EnumDescriptionHelper.GetDescriptions(Type);
    }
}